Skip to content

Show benchmark run history in the instance tab - #78

Merged
amh1k merged 2 commits into
mainfrom
feat/run-history-ui
Nov 6, 2026
Merged

amh1k merged 2 commits into
mainfrom
feat/run-history-ui

Conversation

@spron-in

@spron-in spron-in commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Part of #46. UI for persistent run history. Stacked on #77 (needs GET /api/runs and databaseType); review/merge #77 first — this PR's base retargets to main when #77 merges.

What changed

  • History section in the instance tab (BenchmarkRunHistory): the 20 most recent runs, newest first — started time, tool, status chip, duration, metrics (one per line) or the failure reason. View opens a run as the existing result card; runs already shown are marked Shown. Loading, empty, and error-with-retry states; earlier rows stay visible while reloading.
  • Refresh behavior: reloads when a run is started and when a run started in this tab finishes; opening a past run does not trigger a reload. Manual Refresh button.
  • Storage notice: when /api/status reports in-memory storage, the section explains history is lost on restart and expires after an hour. getBenchmarkServiceStatus now returns drivers plus persistentHistory; getEnabledBenchmarkDrivers is unchanged for existing callers.
  • API client (benchmarkHistoryApi): reuses the existing strict run validation (parseBenchmarkRun, now exported and able to validate entries without an expected ID) and rejects the whole page on any malformed entry. databaseType is parsed when present.
  • Status labels/colors and metric value formatting moved to shared modules used by both result cards and history.
  • History is only requested for providers with a supported driver, preserving the existing "no requests for unknown/unsupported providers" behavior.

Tests

New benchmarkHistoryApi.test.ts and benchmarkRunHistory.test.tsx (table content, storage notice, view/shown, reload + failure recovery, abort, and tab-level refresh triggers — verified to fail if refresh-on-finish is removed or applied to opened runs). Existing workflow/registration tests stub the new history request. All frontend suites and the build pass; checked visually in a harness with mocked API data at narrow and 1280px widths.

Add a History section listing the instance's 20 most recent runs with
tool, status, duration, and metrics or failure reason. It reloads when
a run is started and when a run started in the tab finishes, but not
when a past run is opened. View opens a run as a result card. The
section notes when the service keeps history only in memory, using the
storage reported by /api/status.

History entries reuse the existing run response validation and reject
the whole page on any malformed entry. Status labels and metric value
formatting move to shared modules used by result cards and history.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Sergey Pronin <sp@solanica.io>
Base automatically changed from feat/persistent-run-storage to main November 6, 2026 18:15
Signed-off-by: amh1k <abdulmoizx97@gmail.com>
@amh1k
amh1k merged commit 62cddef into main Nov 6, 2026
7 checks passed
@amh1k
amh1k deleted the feat/run-history-ui branch November 6, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants